import Cookies from 'js-cookie'

const TokenKey = 'access-token'

const UserTypeKey = 'userType'

const AvatarKey = 'avatar'

const ShopKey = 'shopId'


export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function setUserType(userType) {
  return Cookies.set(UserTypeKey, userType)
}

export function removeUserType() {
  return Cookies.remove(UserTypeKey)
}

export function getUserType() {
  return Cookies.get(UserTypeKey)
}


export function removeAvatar() {
  return Cookies.remove(AvatarKey)
}

export function setAvatar(avatar) {
  return Cookies.set(AvatarKey, avatar)
}

export function getAvatar() {
  return Cookies.get(AvatarKey)
}


export function removeShopId() {
  return Cookies.remove(ShopKey)
}

export function setShopId(shopId) {
  return Cookies.set(ShopKey, shopId)
}

export function getShopId() {
  return Cookies.get(ShopKey)
}
